\(\int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx\) [833]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 91 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=-\text {arccosh}(x)+\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \arctan \left (\frac {\sqrt {1+x}}{\sqrt {-2+\sqrt {5}} \sqrt {-1+x}}\right )+\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {1+x}}{\sqrt {2+\sqrt {5}} \sqrt {-1+x}}\right ) \]

[Out]

-arccosh(x)+1/5*arctan((1+x)^(1/2)/(-1+x)^(1/2)/(-2+5^(1/2))^(1/2))*(-10+10*5^(1/2))^(1/2)+1/5*arctanh((1+x)^(
1/2)/(-1+x)^(1/2)/(2+5^(1/2))^(1/2))*(10+10*5^(1/2))^(1/2)

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(191\) vs. \(2(91)=182\).

Time = 0.11 (sec) , antiderivative size = 191, normalized size of antiderivative = 2.10, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {915, 1005, 223, 212, 1048, 739, 210} \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\frac {\sqrt {\frac {1}{10} \left (\sqrt {5}-1\right )} \sqrt {x-1} \sqrt {x+1} \arctan \left (\frac {2-\left (1-\sqrt {5}\right ) x}{\sqrt {2 \left (\sqrt {5}-1\right )} \sqrt {x^2-1}}\right )}{\sqrt {x^2-1}}-\frac {\sqrt {x-1} \sqrt {x+1} \text {arctanh}\left (\frac {x}{\sqrt {x^2-1}}\right )}{\sqrt {x^2-1}}-\frac {\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \sqrt {x-1} \sqrt {x+1} \text {arctanh}\left (\frac {2-\left (1+\sqrt {5}\right ) x}{\sqrt {2 \left (1+\sqrt {5}\right )} \sqrt {x^2-1}}\right )}{\sqrt {x^2-1}} \]

[In]

Int[(Sqrt[-1 + x]*Sqrt[1 + x])/(1 + x - x^2),x]

[Out]

(Sqrt[(-1 + Sqrt[5])/10]*Sqrt[-1 + x]*Sqrt[1 + x]*ArcTan[(2 - (1 - Sqrt[5])*x)/(Sqrt[2*(-1 + Sqrt[5])]*Sqrt[-1
 + x^2])])/Sqrt[-1 + x^2] - (Sqrt[-1 + x]*Sqrt[1 + x]*ArcTanh[x/Sqrt[-1 + x^2]])/Sqrt[-1 + x^2] - (Sqrt[(1 + S
qrt[5])/10]*Sqrt[-1 + x]*Sqrt[1 + x]*ArcTanh[(2 - (1 + Sqrt[5])*x)/(Sqrt[2*(1 + Sqrt[5])]*Sqrt[-1 + x^2])])/Sq
rt[-1 + x^2]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 739

Int[1/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (c_.)*(x_)^2]), x_Symbol] :> -Subst[Int[1/(c*d^2 + a*e^2 - x^2), x], x,
 (a*e - c*d*x)/Sqrt[a + c*x^2]] /; FreeQ[{a, c, d, e}, x]

Rule 915

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :>
Dist[(d + e*x)^FracPart[m]*((f + g*x)^FracPart[m]/(d*f + e*g*x^2)^FracPart[m]), Int[(d*f + e*g*x^2)^m*(a + b*x
 + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[m - n, 0] && EqQ[e*f + d*g, 0]

Rule 1005

Int[Sqrt[(a_) + (c_.)*(x_)^2]/((d_) + (e_.)*(x_) + (f_.)*(x_)^2), x_Symbol] :> Dist[c/f, Int[1/Sqrt[a + c*x^2]
, x], x] - Dist[1/f, Int[(c*d - a*f + c*e*x)/(Sqrt[a + c*x^2]*(d + e*x + f*x^2)), x], x] /; FreeQ[{a, c, d, e,
 f}, x] && NeQ[e^2 - 4*d*f, 0]

Rule 1048

Int[((g_.) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (f_.)*(x_)^2]), x_Symbol] :> With[{q
= Rt[b^2 - 4*a*c, 2]}, Dist[(2*c*g - h*(b - q))/q, Int[1/((b - q + 2*c*x)*Sqrt[d + f*x^2]), x], x] - Dist[(2*c
*g - h*(b + q))/q, Int[1/((b + q + 2*c*x)*Sqrt[d + f*x^2]), x], x]] /; FreeQ[{a, b, c, d, f, g, h}, x] && NeQ[
b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c]

Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {\sqrt {-1+x^2}}{1+x-x^2} \, dx}{\sqrt {-1+x^2}} \\ & = -\frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {1}{\sqrt {-1+x^2}} \, dx}{\sqrt {-1+x^2}}+\frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {x}{\left (1+x-x^2\right ) \sqrt {-1+x^2}} \, dx}{\sqrt {-1+x^2}} \\ & = -\frac {\left (\sqrt {-1+x} \sqrt {1+x}\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}+\frac {\left (\left (5-\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {1}{\left (1-\sqrt {5}-2 x\right ) \sqrt {-1+x^2}} \, dx}{5 \sqrt {-1+x^2}}+\frac {\left (\left (5+\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \int \frac {1}{\left (1+\sqrt {5}-2 x\right ) \sqrt {-1+x^2}} \, dx}{5 \sqrt {-1+x^2}} \\ & = -\frac {\sqrt {-1+x} \sqrt {1+x} \tanh ^{-1}\left (\frac {x}{\sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}-\frac {\left (\left (5-\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \text {Subst}\left (\int \frac {1}{-4+\left (1-\sqrt {5}\right )^2-x^2} \, dx,x,\frac {2-\left (1-\sqrt {5}\right ) x}{\sqrt {-1+x^2}}\right )}{5 \sqrt {-1+x^2}}-\frac {\left (\left (5+\sqrt {5}\right ) \sqrt {-1+x} \sqrt {1+x}\right ) \text {Subst}\left (\int \frac {1}{-4+\left (1+\sqrt {5}\right )^2-x^2} \, dx,x,\frac {2-\left (1+\sqrt {5}\right ) x}{\sqrt {-1+x^2}}\right )}{5 \sqrt {-1+x^2}} \\ & = \frac {\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \sqrt {-1+x} \sqrt {1+x} \tan ^{-1}\left (\frac {2-\left (1-\sqrt {5}\right ) x}{\sqrt {2 \left (-1+\sqrt {5}\right )} \sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}-\frac {\sqrt {-1+x} \sqrt {1+x} \tanh ^{-1}\left (\frac {x}{\sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}}-\frac {\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \sqrt {-1+x} \sqrt {1+x} \tanh ^{-1}\left (\frac {2-\left (1+\sqrt {5}\right ) x}{\sqrt {2 \left (1+\sqrt {5}\right )} \sqrt {-1+x^2}}\right )}{\sqrt {-1+x^2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.12 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=-\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \arctan \left (\sqrt {-2+\sqrt {5}} \sqrt {\frac {-1+x}{1+x}}\right )-2 \text {arctanh}\left (\sqrt {\frac {-1+x}{1+x}}\right )+\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \text {arctanh}\left (\sqrt {2+\sqrt {5}} \sqrt {\frac {-1+x}{1+x}}\right ) \]

[In]

Integrate[(Sqrt[-1 + x]*Sqrt[1 + x])/(1 + x - x^2),x]

[Out]

-(Sqrt[(2*(-1 + Sqrt[5]))/5]*ArcTan[Sqrt[-2 + Sqrt[5]]*Sqrt[(-1 + x)/(1 + x)]]) - 2*ArcTanh[Sqrt[(-1 + x)/(1 +
 x)]] + Sqrt[(2*(1 + Sqrt[5]))/5]*ArcTanh[Sqrt[2 + Sqrt[5]]*Sqrt[(-1 + x)/(1 + x)]]

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(230\) vs. \(2(65)=130\).

Time = 0.60 (sec) , antiderivative size = 231, normalized size of antiderivative = 2.54

method result size
default \(-\frac {\sqrt {1+x}\, \sqrt {-1+x}\, \sqrt {5}\, \left (\sqrt {5}\, \sqrt {2 \sqrt {5}-2}\, \sqrt {2 \sqrt {5}+2}\, \ln \left (x +\sqrt {x^{2}-1}\right )-\sqrt {5}\, \sqrt {2 \sqrt {5}-2}\, \operatorname {arctanh}\left (\frac {\sqrt {5}\, x +x -2}{\sqrt {2 \sqrt {5}+2}\, \sqrt {x^{2}-1}}\right )-\sqrt {5}\, \sqrt {2 \sqrt {5}+2}\, \arctan \left (\frac {\sqrt {5}\, x -x +2}{\sqrt {2 \sqrt {5}-2}\, \sqrt {x^{2}-1}}\right )-\sqrt {2 \sqrt {5}-2}\, \operatorname {arctanh}\left (\frac {\sqrt {5}\, x +x -2}{\sqrt {2 \sqrt {5}+2}\, \sqrt {x^{2}-1}}\right )+\sqrt {2 \sqrt {5}+2}\, \arctan \left (\frac {\sqrt {5}\, x -x +2}{\sqrt {2 \sqrt {5}-2}\, \sqrt {x^{2}-1}}\right )\right )}{5 \sqrt {2 \sqrt {5}-2}\, \sqrt {2 \sqrt {5}+2}\, \sqrt {x^{2}-1}}\) \(231\)

[In]

int((-1+x)^(1/2)*(1+x)^(1/2)/(-x^2+x+1),x,method=_RETURNVERBOSE)

[Out]

-1/5*(1+x)^(1/2)*(-1+x)^(1/2)*5^(1/2)*(5^(1/2)*(2*5^(1/2)-2)^(1/2)*(2*5^(1/2)+2)^(1/2)*ln(x+(x^2-1)^(1/2))-5^(
1/2)*(2*5^(1/2)-2)^(1/2)*arctanh((5^(1/2)*x+x-2)/(2*5^(1/2)+2)^(1/2)/(x^2-1)^(1/2))-5^(1/2)*(2*5^(1/2)+2)^(1/2
)*arctan((5^(1/2)*x-x+2)/(2*5^(1/2)-2)^(1/2)/(x^2-1)^(1/2))-(2*5^(1/2)-2)^(1/2)*arctanh((5^(1/2)*x+x-2)/(2*5^(
1/2)+2)^(1/2)/(x^2-1)^(1/2))+(2*5^(1/2)+2)^(1/2)*arctan((5^(1/2)*x-x+2)/(2*5^(1/2)-2)^(1/2)/(x^2-1)^(1/2)))/(2
*5^(1/2)-2)^(1/2)/(2*5^(1/2)+2)^(1/2)/(x^2-1)^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (65) = 130\).

Time = 0.43 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.21 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\frac {1}{10} \, \sqrt {5} \sqrt {2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x + \sqrt {5} + \sqrt {2 \, \sqrt {5} + 2} + 1\right ) - \frac {1}{10} \, \sqrt {5} \sqrt {2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x + \sqrt {5} - \sqrt {2 \, \sqrt {5} + 2} + 1\right ) - \frac {1}{10} \, \sqrt {5} \sqrt {-2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x - \sqrt {5} + \sqrt {-2 \, \sqrt {5} + 2} + 1\right ) + \frac {1}{10} \, \sqrt {5} \sqrt {-2 \, \sqrt {5} + 2} \log \left (2 \, \sqrt {x + 1} \sqrt {x - 1} - 2 \, x - \sqrt {5} - \sqrt {-2 \, \sqrt {5} + 2} + 1\right ) + \log \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) \]

[In]

integrate((-1+x)^(1/2)*(1+x)^(1/2)/(-x^2+x+1),x, algorithm="fricas")

[Out]

1/10*sqrt(5)*sqrt(2*sqrt(5) + 2)*log(2*sqrt(x + 1)*sqrt(x - 1) - 2*x + sqrt(5) + sqrt(2*sqrt(5) + 2) + 1) - 1/
10*sqrt(5)*sqrt(2*sqrt(5) + 2)*log(2*sqrt(x + 1)*sqrt(x - 1) - 2*x + sqrt(5) - sqrt(2*sqrt(5) + 2) + 1) - 1/10
*sqrt(5)*sqrt(-2*sqrt(5) + 2)*log(2*sqrt(x + 1)*sqrt(x - 1) - 2*x - sqrt(5) + sqrt(-2*sqrt(5) + 2) + 1) + 1/10
*sqrt(5)*sqrt(-2*sqrt(5) + 2)*log(2*sqrt(x + 1)*sqrt(x - 1) - 2*x - sqrt(5) - sqrt(-2*sqrt(5) + 2) + 1) + log(
sqrt(x + 1)*sqrt(x - 1) - x)

Sympy [F]

\[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=- \int \frac {\sqrt {x - 1} \sqrt {x + 1}}{x^{2} - x - 1}\, dx \]

[In]

integrate((-1+x)**(1/2)*(1+x)**(1/2)/(-x**2+x+1),x)

[Out]

-Integral(sqrt(x - 1)*sqrt(x + 1)/(x**2 - x - 1), x)

Maxima [F]

\[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\int { -\frac {\sqrt {x + 1} \sqrt {x - 1}}{x^{2} - x - 1} \,d x } \]

[In]

integrate((-1+x)^(1/2)*(1+x)^(1/2)/(-x^2+x+1),x, algorithm="maxima")

[Out]

-integrate(sqrt(x + 1)*sqrt(x - 1)/(x^2 - x - 1), x)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.18 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=\log \left ({\left (\sqrt {x + 1} - \sqrt {x - 1}\right )}^{2}\right ) \]

[In]

integrate((-1+x)^(1/2)*(1+x)^(1/2)/(-x^2+x+1),x, algorithm="giac")

[Out]

log((sqrt(x + 1) - sqrt(x - 1))^2)

Mupad [B] (verification not implemented)

Time = 14.73 (sec) , antiderivative size = 916, normalized size of antiderivative = 10.07 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{1+x-x^2} \, dx=-4\,\mathrm {atanh}\left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )-\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {3408370\,\sqrt {10}\,\sqrt {\sqrt {5}+1}-\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,300730{}\mathrm {i}-3408370\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}-1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}+7836865\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}+3066340\,\sqrt {10}\,x^2\,\sqrt {\sqrt {5}+1}-1294942\,\sqrt {5}\,\sqrt {10}\,x^2\,\sqrt {\sqrt {5}+1}+\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,300730{}\mathrm {i}-\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,134482{}\mathrm {i}+1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}-\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,300730{}\mathrm {i}-6132680\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}-3475583\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}+\sqrt {5}\,\sqrt {10}\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,134482{}\mathrm {i}+\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,150365{}\mathrm {i}-\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,134482{}\mathrm {i}+2589884\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x+1}+\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,\sqrt {x-1}\,\sqrt {x+1}\,67241{}\mathrm {i}}{29119280\,x-24066900\,x\,\sqrt {x+1}-11518800\,\sqrt {5}\,x-10104760\,\sqrt {x+1}-7067880\,\sqrt {5}-3992430\,\sqrt {5}\,x^2+12033450\,x^2+7067880\,\sqrt {5}\,\sqrt {x+1}+7984860\,\sqrt {5}\,x\,\sqrt {x+1}+10104760}\right )\,\sqrt {\sqrt {5}+1}\,1{}\mathrm {i}}{5}-\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {3408370\,\sqrt {10}\,\sqrt {1-\sqrt {5}}+3066340\,\sqrt {10}\,x^2\,\sqrt {1-\sqrt {5}}-\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,300730{}\mathrm {i}-3408370\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}+1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}+7836865\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}+3475583\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}+1294942\,\sqrt {5}\,\sqrt {10}\,x^2\,\sqrt {1-\sqrt {5}}+\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,300730{}\mathrm {i}+\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,134482{}\mathrm {i}-1771398\,\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}-\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,300730{}\mathrm {i}-6132680\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}-\sqrt {5}\,\sqrt {10}\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,134482{}\mathrm {i}+\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,150365{}\mathrm {i}+\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,134482{}\mathrm {i}-2589884\,\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x+1}-\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,\sqrt {x-1}\,\sqrt {x+1}\,67241{}\mathrm {i}}{29119280\,x-24066900\,x\,\sqrt {x+1}+11518800\,\sqrt {5}\,x-10104760\,\sqrt {x+1}+7067880\,\sqrt {5}+3992430\,\sqrt {5}\,x^2+12033450\,x^2-7067880\,\sqrt {5}\,\sqrt {x+1}-7984860\,\sqrt {5}\,x\,\sqrt {x+1}+10104760}\right )\,\sqrt {1-\sqrt {5}}\,1{}\mathrm {i}}{5} \]

[In]

int(((x - 1)^(1/2)*(x + 1)^(1/2))/(x - x^2 + 1),x)

[Out]

- 4*atanh(((x - 1)^(1/2) - 1i)/((x + 1)^(1/2) - 1)) - (10^(1/2)*atan((3408370*10^(1/2)*(5^(1/2) + 1)^(1/2) - 1
0^(1/2)*(5^(1/2) + 1)^(1/2)*(x - 1)^(1/2)*300730i - 3408370*10^(1/2)*(5^(1/2) + 1)^(1/2)*(x + 1)^(1/2) - 17713
98*5^(1/2)*10^(1/2)*(5^(1/2) + 1)^(1/2) + 7836865*10^(1/2)*x*(5^(1/2) + 1)^(1/2) + 3066340*10^(1/2)*x^2*(5^(1/
2) + 1)^(1/2) - 1294942*5^(1/2)*10^(1/2)*x^2*(5^(1/2) + 1)^(1/2) + 10^(1/2)*(5^(1/2) + 1)^(1/2)*(x - 1)^(1/2)*
(x + 1)^(1/2)*300730i - 5^(1/2)*10^(1/2)*(5^(1/2) + 1)^(1/2)*(x - 1)^(1/2)*134482i + 1771398*5^(1/2)*10^(1/2)*
(5^(1/2) + 1)^(1/2)*(x + 1)^(1/2) - 10^(1/2)*x*(5^(1/2) + 1)^(1/2)*(x - 1)^(1/2)*300730i - 6132680*10^(1/2)*x*
(5^(1/2) + 1)^(1/2)*(x + 1)^(1/2) - 3475583*5^(1/2)*10^(1/2)*x*(5^(1/2) + 1)^(1/2) + 5^(1/2)*10^(1/2)*(5^(1/2)
 + 1)^(1/2)*(x - 1)^(1/2)*(x + 1)^(1/2)*134482i + 10^(1/2)*x*(5^(1/2) + 1)^(1/2)*(x - 1)^(1/2)*(x + 1)^(1/2)*1
50365i - 5^(1/2)*10^(1/2)*x*(5^(1/2) + 1)^(1/2)*(x - 1)^(1/2)*134482i + 2589884*5^(1/2)*10^(1/2)*x*(5^(1/2) +
1)^(1/2)*(x + 1)^(1/2) + 5^(1/2)*10^(1/2)*x*(5^(1/2) + 1)^(1/2)*(x - 1)^(1/2)*(x + 1)^(1/2)*67241i)/(29119280*
x - 24066900*x*(x + 1)^(1/2) - 11518800*5^(1/2)*x - 10104760*(x + 1)^(1/2) - 7067880*5^(1/2) - 3992430*5^(1/2)
*x^2 + 12033450*x^2 + 7067880*5^(1/2)*(x + 1)^(1/2) + 7984860*5^(1/2)*x*(x + 1)^(1/2) + 10104760))*(5^(1/2) +
1)^(1/2)*1i)/5 - (10^(1/2)*atan((3408370*10^(1/2)*(1 - 5^(1/2))^(1/2) + 3066340*10^(1/2)*x^2*(1 - 5^(1/2))^(1/
2) - 10^(1/2)*(1 - 5^(1/2))^(1/2)*(x - 1)^(1/2)*300730i - 3408370*10^(1/2)*(1 - 5^(1/2))^(1/2)*(x + 1)^(1/2) +
 1771398*5^(1/2)*10^(1/2)*(1 - 5^(1/2))^(1/2) + 7836865*10^(1/2)*x*(1 - 5^(1/2))^(1/2) + 3475583*5^(1/2)*10^(1
/2)*x*(1 - 5^(1/2))^(1/2) + 1294942*5^(1/2)*10^(1/2)*x^2*(1 - 5^(1/2))^(1/2) + 10^(1/2)*(1 - 5^(1/2))^(1/2)*(x
 - 1)^(1/2)*(x + 1)^(1/2)*300730i + 5^(1/2)*10^(1/2)*(1 - 5^(1/2))^(1/2)*(x - 1)^(1/2)*134482i - 1771398*5^(1/
2)*10^(1/2)*(1 - 5^(1/2))^(1/2)*(x + 1)^(1/2) - 10^(1/2)*x*(1 - 5^(1/2))^(1/2)*(x - 1)^(1/2)*300730i - 6132680
*10^(1/2)*x*(1 - 5^(1/2))^(1/2)*(x + 1)^(1/2) - 5^(1/2)*10^(1/2)*(1 - 5^(1/2))^(1/2)*(x - 1)^(1/2)*(x + 1)^(1/
2)*134482i + 10^(1/2)*x*(1 - 5^(1/2))^(1/2)*(x - 1)^(1/2)*(x + 1)^(1/2)*150365i + 5^(1/2)*10^(1/2)*x*(1 - 5^(1
/2))^(1/2)*(x - 1)^(1/2)*134482i - 2589884*5^(1/2)*10^(1/2)*x*(1 - 5^(1/2))^(1/2)*(x + 1)^(1/2) - 5^(1/2)*10^(
1/2)*x*(1 - 5^(1/2))^(1/2)*(x - 1)^(1/2)*(x + 1)^(1/2)*67241i)/(29119280*x - 24066900*x*(x + 1)^(1/2) + 115188
00*5^(1/2)*x - 10104760*(x + 1)^(1/2) + 7067880*5^(1/2) + 3992430*5^(1/2)*x^2 + 12033450*x^2 - 7067880*5^(1/2)
*(x + 1)^(1/2) - 7984860*5^(1/2)*x*(x + 1)^(1/2) + 10104760))*(1 - 5^(1/2))^(1/2)*1i)/5